﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setCharacterEncoding("UTF-8");
	String htmlData = request.getParameter("content1") != null
			? request.getParameter("content1")
			: "";
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<head>
	<link rel="shortcut icon" href="image/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" href="<%=basePath%>common/default/default.css" />
	<link rel="stylesheet"
		href="<%=basePath%>common/plugins/code/prettify.css" />
	<script charset="utf-8" src="<%=basePath%>common/lang/kindeditor.js"></script>
	<script charset="utf-8" src="<%=basePath%>common/lang/zh_CN.js"></script>
	<script charset="utf-8"
		src="<%=basePath%>common/plugins/code/prettify.js"></script>
</head>
<!-- Main content -->
<section class="content" id="refundcontent">
<div class="row">
	<div class="col-md-12">

		<div class="box box-danger">
			<div class="box-header">

				<section class="content-header">
				<h1>
					<ol class="breadcrumb">
						<li>
							<a href="<%=basePath%>admin/fengcai"><i
								class="fa fa-th-list fa-lg"></i>列表</a>
						</li>
						<li>
							修改
						</li>
					</ol>
				</h1>


				</section>
			</div>
			<div class="box-body">
				<!-- phone mask -->
				<div class="form-group">

					<div class="bg-info" style="padding: 10px;">
						<p>
							<form name="example" method="post" action="updatefc"
								accept-charset="UTF-8">
								标题：
								<input style="margin-right: 80px;" type="text" name="title"
									value="${tz.title}" />
								<br />
								 职位：
								<select name="type">
									<option value="会长" selected="selected">
										会长
									</option>
									<option value="常务副会长">
										常务副会长
									</option>
									<option value="监事长">
										监事长
									</option>
									<option value="副会长">
										副会长
									</option>
									<option value="秘书长">
										秘书长
									</option>
									<option value="理事">
										理事
									</option>
									<option value="会员">
										会员
									</option>
								</select><br>
								
								<div class="box box-info" style="height: 300px; width: 500px;">

									<div class="box-body" style="height: auto; overflow: hidden;">
										<!-- Color Picker -->
										<div class="form-group">
											<img id="img" src="${tz.imgurl } " width="307px"
												height="178px" />

											<label style="position: absolute; top: 10px; right: 10px;"
												for="fileupload_input" class="btn btn-info">
												上传封面图片
											</label>
											<input type="file" name="files" id="fileupload_input"
												multiple style="display: none" />
											<input type="hidden" name="imgurl" id="picurl"
												value="${tz.imgurl }" />

										</div>
										<!-- /.form group -->
									</div>
									<!-- /.box-body -->
								</div>
								<!-- /.box -->


								<input style="margin-right: 80px;" type="hidden" name="id"
									value="${tz.id}" />
								<br />
								公司名称：
								<input style="margin-right: 80px;" type="text" name="comname"
									value="${tz.comname }" />
								<br>
								<label>
									内容:
								</label>
								<textarea name="content" cols="100" rows="8"
									style="width: 100%; height: 400px; visibility: hidden; font-size: 14px;">${tz.content}</textarea>
								<br />
								<input type="submit" name="button" value="提交内容" />
							</form>
						</p>
					</div>
					<div class="form-group">

					</div>
					<!-- /.form group -->

				</div>
				<!-- /.form group -->

			</div>
			<!-- /.box-body -->
		</div>
		<!-- /.box -->

	</div>
	<!-- /.col (left) -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
<%!private String htmlspecialchars(String str) {
		str = str.replaceAll("&", "&amp;");
		str = str.replaceAll("<", "&lt;");
		str = str.replaceAll(">", "&gt;");
		str = str.replaceAll("\"", "&quot;");
		return str;
	}%>
<script>

		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content"]', {
				cssPath : '<%=basePath%>common/plugins/code/prettify.css',
				uploadJson : '../upload_json.jsp',
				fileManagerJson : '../file_manager_json.jsp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
<script type="text/javascript">

		 $("#fileupload_input").fileupload({
					    url:"<%=basePath%>admin/uploadImg",
					    done:function(e,result){
								
					          $("#img").attr("src",result.result.entity);
					          $("#picurl").val(result.result.entity);
					       alert( $("#picurl").val());
					    }
					});
	$("#datetimepicker").datetimepicker( {
		language : 'zh-CN',
		minView : '2',
		format : 'yyyy-mm-dd'
	});
</script>
